*************************************
*zip_bag_bound_semicolon.dta --> zip_bag_bound_semicolon1.dta
*generate NSO_aimag_name, NSO_soum_name, NSO_bag_name, FID_numbase, FID_namebase
*************************************

clear all
import delimited "rawdata/confidential/bagmap/zip_bag_bound_semicolon.csv",clear

do "dofile/aux/rename_subdistrictnames_inthemap.do"

save  "intermediate/confidential/zip_bag_bound_semicolon_mapmatchkey.dta", replace


import excel "rawdata/confidential/bagmap/zip_bag_bound_PolygonNeighbor.xls",clear firstrow
gen neighborpair = string(src_FID) + "+" + string(nbr_FID)
keep neighborpair
gen neighbor = 1
save  "intermediate/confidential/neighborpair.dta", replace

